package com.pet.order.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author Cookies
 * @since 2024-09-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("`order`")
@ApiModel(value="Order对象", description="订单表")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单id，唯一标识")
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @ApiModelProperty(value = "下单用户id")
    private Integer userId;

    @ApiModelProperty(value = "订单总金额(分)")
    private Integer totalFee;

    @ApiModelProperty(value = "折扣比率(省略百分比)")
    private Integer discountRate;

    @ApiModelProperty(value = "订单状态 0-待支付 1-已支付 2-已发货 3-已收货 4-已评价 -1-取消订单 -2-申请退单 -3-管理员退单")
    private Integer status;

    @ApiModelProperty(value = "支付类型 1-支付宝 2-微信 3-余额支付")
    private Integer paymentType;

    @ApiModelProperty(value = "支付时间")
    private LocalDateTime paymentTime;

    @ApiModelProperty(value = "发货时间")
    private LocalDateTime shipTime;

    @ApiModelProperty(value = "收货时间")
    private LocalDateTime receiveTime;

    @ApiModelProperty(value = "评价时间")
    private LocalDateTime evaluateTime;

    @ApiModelProperty(value = "取消时间")
    private LocalDateTime cancelTime;

    @ApiModelProperty(value = "申请退单时间")
    private LocalDateTime refundRequestTime;

    @ApiModelProperty(value = "退单理由")
    private String refundReason;

    @ApiModelProperty(value = "退单审核时间")
    private LocalDateTime refundAuditTime;

    @ApiModelProperty(value = "退单审核结果 1-审核通过 0-审核不通过")
    private Integer refundAuditResult;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updatedAt;


}
